const mongoose = require('mongoose')

const customer = new mongoose.Schema({
    name: {
        type: String,
        required: true
    },
    phone: {
        type: String
    },
    order: {
        type: mongoose.SchemaTypes.ObjectId,
        ref: 'order'
    },
    idCard: {
        type: String
    }
}, {versionKey: false, timestamps: {createdAt: 'create_time', updatedAt: 'update_time'}})

module.exports = mongoose.model('customer', customer)
